package com.matt.foundation.constant;

import lombok.Setter;

/**
 * ****************
 * Created by Ron
 * from com.matt
 * on 2018/9/18 0018.
 * ********************
 */
public class ClienteleConstant {

    //客户状态
    public enum Status {
        NON_HANDLE(1, "沟通中"), //未处理
        ORDERED(2, "已邀约"), //已预约
        ARRIVED(3, "已到访"),
        FINISH_APPLY_TABLE(4, "已完成申请表"),
        INTERVIEWED(5,"已面试"),
        ORDER_CASH(6,"已交定金"),
        NON_PASS_INTERVIEW(7,"面试不通过"),
        DISAGREE_IDEA(8,"方案不满意"),
        DISAGREE_AREA(9,"园区不满意"),
        NON_PAY_ABILITY(10,"无支付支付能力"),
        SUCCESS(11,"已成交"),
        OTHER(12,"其他");


        @Setter
        private int code;

        @Setter
        private String value;

        Status(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public Status get(int code){
            for (Status status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }

    //客户签约状态
    public enum SignStatus{
        NON_SIGN(0,"未成交"),
        SIGN(1,"已成交");

        @Setter
        private int code;

        @Setter
        private String value;

        SignStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public SignStatus get(int code){
            for (SignStatus signStatus : values()) {
                if (signStatus.codeOf()==code)
                    return signStatus;
            }
            return null;
        }

    }

}
